import './style.css'
import { Tabs } from 'antd-mobile'
import { useTabs } from './hooks/useTabs'
import HomeList from './HomeList'
const Home = () => {
  const {channelList} = useTabs()
  return (
  <div>
    <div className="tabContainer">
      {/* tab标签栏 */}
      <Tabs defaultActiveKey={'0'}>
        {channelList.map(item => (
          <Tabs.Tab title={item.name} key={item.id}>
          {/* list组件 */}
          <div className="listContainer">
            <HomeList channelId={'' + item.id} />
          </div>
        </Tabs.Tab>
        ))}
        </Tabs>

    </div>
  </div>)
}
export default Home